This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Not sure I understand but here's some of my code....
Just opening the document in the Mail app so that it displays in the User Interface and then the User pushes an action button that access the document in LS as follows:
Dim s As New NotesSession
Dim ws As New NotesUIWorkspace
Set db = s.CurrentDatabase
Set uidoc = ws.CurrentDocument
Set doc = uidoc.Document
At this point if you look in the doc.items the $File item has disappeared. Also, of course, the Body Item contains nothing.
For all other embedded/attached items the following code seems to work fine, and has done for a few years,:
Set rt2 = New NotesRichTextItem(newEvent, "Attacha")
Call rt2.AppendText(bodd)
If procattach = "X" Then
Set rt1 = doc.GetFirstItem("Body")
If Not Isempty(rt1.EmbeddedObjects) Then
Forall object In rt1.EmbeddedObjects
If ( object.Type = EMBED_ATTACHMENT And object.FileSize > 0 ) Then
filename=ReplaceSubstring(object.Name,"?","")
filename=ReplaceSubstring(filename,"\","")
filename=ReplaceSubstring(filename,"/","")
filename=ReplaceSubstring(filename,":","")
filename=ReplaceSubstring(filename,"<","")
filename=ReplaceSubstring(filename,">","")
filename=ReplaceSubstring(filename,"|","")
filename=ReplaceSubstring(filename,"*","")
filename=ReplaceSubstring(filename,Chr$(9),"")
Call object.ExtractFile("c:\nobblesext\" & filename)
End If
Call rt2.EmbedObject(EMBED_ATTACHMENT, "", "c:\nobblesext\" & filename)
If Dir$("c:\nobblesext\" & filename) = filename Then
Kill "c:\nobblesext\" & filename
End If
End Forall
End If
End If
Not exactly sure if this sheds more light on what you asked or not.
Feedback response number WEBB8BAMH5 created by ~James Lopvelukony on 11/17/2010